
import apiHelper from './apiHelper';

class getDataService {

	//请求 ：通过订单号，得到车辆相关数据
	getInfo(data) {
		let requestParam = {
			url: `${apiHelper.baseApiUrl}cars/findByOrderId`, // test 测试:实际是 url: urls
			data: {
				method: 'get',
				body: data
			}
		};
		return apiHelper.fetch(requestParam);
	}
	//请求 ：通过订单号，查询订单邮寄接口
	getMailType(data) {
		let requestParam = {
			url: `${apiHelper.baseApiUrl}flow/mailType`, 
			data: {
				method: 'post',
				body: data
			}
		};
		return apiHelper.fetch(requestParam);
	}

	/**
	 *  车牌前缀
	 */
	cityList(data){
		let requestParam = {
			url: `${apiHelper.baseApiUrl}inspection/cityList`,
			data: {
				method: 'post',
				body: data
			}
		};
		return apiHelper.fetch(requestParam);
	}

	/**
	 *  删除地址
	 */
	deleteAddress(data){
		let requestParam = {
			url: `${apiHelper.baseApiUrl}mail/addressDelete`,
			data: {
				method: 'post',
				body: data
			}
		};
		return apiHelper.fetch(requestParam);
	}

	/**
	 *  年检收件人地址列表
	 */
	addressList(data){
		let requestParam = {
			url: `${apiHelper.baseApiUrl}mail/addressList`,
			data: {
				method: 'get',
				body: data
			}
		};
		return apiHelper.fetch(requestParam);
	}

	/**
	 *添加地址
	 */
	addAddressManually(data){
		let requestParam = {
			url: `${apiHelper.baseApiUrl}mail/addressAdd`,
			data: {
				method: 'post',
				body: data
			}
		};
		return apiHelper.fetch(requestParam);
	}

	/**
	 *地址查看
	 */
	addressView(data){
		let requestParam = {
			url: `${apiHelper.baseApiUrl}mail/addressView`,
			data: {
				method: 'get',
				body: data
			}
		};
		return apiHelper.fetch(requestParam);
	}

	/**
	 *编辑地址 更新地址
	 */
	addressUpdate(data){
		let requestParam = {
			url: `${apiHelper.baseApiUrl}mail/addressUpdate`,
			data: {
				method: 'post',
				body: data
			}
		};
		return apiHelper.fetch(requestParam);
	}


	/**
	 *获得地区 三级联动的地区 省，市, 区
	 */
	regionate(data){
		let requestParam = {
			url: `${apiHelper.baseApiUrl}mail/regionList`,
			data: {
				method: 'get',
				body: data
			}
		};
		return apiHelper.fetch(requestParam);
	}

	/**
	 * 办理进度
	 * */
	flowDataList(data){
		let requestParam = {
			url: `${apiHelper.baseApiUrl}flow/list`,
			data: {
				method: 'get',
				body: data
			}
		};
		return apiHelper.fetch(requestParam);
	}

	/**
	 * 提交确定
	 * */
	doConfirm(data){
		let requestParam = {
			url: `${apiHelper.baseApiUrl}flow/doConfirm`,
			data: {
				method: 'post',
				body: data
			}
		};
		return apiHelper.fetch(requestParam);
	}
/**
	 * 确认订单邮寄地址接口（免检）
	 * */
	confirmAddress(data){
		let requestParam = {
			url: `${apiHelper.baseApiUrl}flow/confirmAddress`,
			data: {
				method: 'post',
				body: data
			}
		};
		return apiHelper.fetch(requestParam);
	}
	/**
	 * 查询订单详情接口
	 * */
	orderView(data){
		let requestParam = {
			url: `${apiHelper.baseApiUrl}order/view`,
			data: {
				method: 'get',
				body: data
			}
		};
		return apiHelper.fetch(requestParam);
	}


requirements(data){
        let requestParam = {
            url: `${apiHelper.baseApiUrl}inspection/requirements`,
            data: {
                method: 'post',
                body: data
            }
        };
        return apiHelper.fetch(requestParam);
	}
		/**
	 * 完结订单：评价详情接口
	 * */
	evaluationView(data){
		let requestParam = {
			url: `${apiHelper.baseApiUrl}order/viewComment`,
			data: {
				method: 'get',
				body: data
			}
		};
		return apiHelper.fetch(requestParam);
	}

	/**
	 * 完结订单：评价详情接口
	 * */
	setEevaluationView(data){
		let requestParam = {
			url: `${apiHelper.baseApiUrl}order/comment`,
			data: {
				method: 'get',
				body: data
			}
		};
		return apiHelper.fetch(requestParam);
	}


}
// 实例化后再导出
export default new getDataService()